<html>
<script>
	
</script>
<head>
<link type="text/css" rel="styleSheet" href="css/default.css" />
<link type="text/css" rel="styleSheet" href="css/css.css" />
<script src="js/vue-cookies.js"></script>
</head>
<body>
<div id="top">
	<div id="topCenter">
		<span class="nav"><a onclick="index()">首页</a></span> 
		<span class="nav"><a onclick="fucos()">板块</a></span>
		<span class="nav"><a onclick="add()">发帖</a></span> 
		<span class="search"><div class="search"><input><button btncolor="blue">搜索</button></div></span>
		<span id="denglu">
		<span class="tag"><a onclick="login()">登录</a></span>
		<span class="tag"><a onclick="newUser()">注册</a></span>
		</span>
		<span id="tuichudenglu">
		<span class="tag"><a onclick="exit()">退出登录</a></span>
		<span class="tag"><a onclick="">消息</a></span>
		</span>
	</div>
</div>
			
			<iframe src="2.html" id="center" frameborder="0" scrolling="no" allowtransparency="yes"></iframe>
			
			<div id="right">
				<div class="button" onclick="myarticle()">我的帖子</div>
				<div class="button" onclick="mycomment()">我的评论</div>
				<div class="button" onclick="myfavorite()">我的收藏</div>
				<div class="button">我的好友</div>
				<div class="button">个人中心</div>
				<div class="button">关于</div>
			</div>

</body>
<script>
//检测是否登录
var userid = this.$cookies.get("userid");
if(this.$cookies.get("username")!=null){
	denglu.style="display:none";
	tuichudenglu.style="";
}else{denglu.style="";tuichudenglu.style="display:none";};
//页面切换
function exit(){
	this.$cookies.remove('username');
	this.$cookies.remove('userid');
	location.reload();
}
function index(){center.src="2.html"}
function fucos(){center.src="3.html"}
function add(){center.src="4.html"}
function login(){center.src="5.html"}
function newUser(){center.src="6.html"}
function myarticle(){center.src="myarticle.html?"+userid}
function myfavorite(){center.src="myfavorite.html?"+userid}
function mycomment(){center.src="mycomment.html?"+userid}
</script>
</html>
